SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for approval_infopo
-- ----------------------------
DROP TABLE IF EXISTS `approval_infopo`;
CREATE TABLE `approval_infopo` (
  `approval_info_id` varchar(255) NOT NULL,
  `applicant_id` varchar(255) DEFAULT NULL,
  `approver_id` varchar(255) DEFAULT NULL,
  `approver_level` int(11) NOT NULL,
  `approver_name` varchar(255) DEFAULT NULL,
  `leave_id` varchar(255) DEFAULT NULL,
  `msg` varchar(255) DEFAULT NULL,
  `time` bigint(20) NOT NULL,
  PRIMARY KEY (`approval_info_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for approval_rulepo
-- ----------------------------
DROP TABLE IF EXISTS `approval_rulepo`;
CREATE TABLE `approval_rulepo` (
  `id` varchar(255) NOT NULL,
  `applicant_role_id` varchar(255) DEFAULT NULL,
  `duration` bigint(20) NOT NULL,
  `leave_type` varchar(255) DEFAULT NULL,
  `person_type` varchar(255) DEFAULT NULL,
  `max_leader_level` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of approval_rulepo
-- ----------------------------
BEGIN;
INSERT INTO `approval_rulepo` VALUES ('12121', '1', 86400000, 'Internal', 'INTERNAL', 4);
INSERT INTO `approval_rulepo` VALUES ('ff80808170d940f90170d9410ccb0000', '234', 86400000, 'Internal', 'INTERNAL', 3);
COMMIT;

-- ----------------------------
-- Table structure for leave_eventpo
-- ----------------------------
DROP TABLE IF EXISTS `leave_eventpo`;
CREATE TABLE `leave_eventpo` (
  `id` varchar(255) NOT NULL,
  `data` text,
  `leave_event_type` varchar(255) DEFAULT NULL,
  `source` varchar(255) DEFAULT NULL,
  `timestamp` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of leave_eventpo
-- ----------------------------
BEGIN;
INSERT INTO `leave_eventpo` VALUES ('ff80808170d98eee0170d98f15e00001', '\"{\\\"applicant\\\":{\\\"personId\\\":\\\"1\\\",\\\"personName\\\":\\\"xiaoming\\\",\\\"personType\\\":\\\"1\\\"},\\\"approver\\\":{\\\"level\\\":4,\\\"personId\\\":\\\"1\\\",\\\"personName\\\":\\\"22\\\"},\\\"currentApprovalInfo\\\":{\\\"approvalInfoId\\\":\\\"1\\\",\\\"approver\\\":{\\\"level\\\":0,\\\"personId\\\":\\\"1\\\",\\\"personName\\\":\\\"ss\\\"},\\\"msg\\\":\\\"ok\\\",\\\"time\\\":0},\\\"duration\\\":-3765597366,\\\"endTime\\\":1580432400000,\\\"id\\\":\\\"111\\\",\\\"leaderMaxLevel\\\":4,\\\"startTime\\\":1584197997366,\\\"status\\\":\\\"APPROVING\\\",\\\"type\\\":\\\"Internal\\\"}\"', 'CREATE_EVENT', NULL, '2020-03-14 22:59:58');
INSERT INTO `leave_eventpo` VALUES ('ff80808170d98fb70170d98fd4830001', '\"{\\\"applicant\\\":{\\\"personId\\\":\\\"1\\\",\\\"personName\\\":\\\"xiaoming\\\",\\\"personType\\\":\\\"1\\\"},\\\"approver\\\":{\\\"level\\\":4,\\\"personId\\\":\\\"1\\\",\\\"personName\\\":\\\"22\\\"},\\\"currentApprovalInfo\\\":{\\\"approvalInfoId\\\":\\\"1\\\",\\\"approver\\\":{\\\"level\\\":0,\\\"personId\\\":\\\"1\\\",\\\"personName\\\":\\\"ss\\\"},\\\"msg\\\":\\\"ok\\\",\\\"time\\\":0},\\\"duration\\\":-3765646737,\\\"endTime\\\":1580432400000,\\\"id\\\":\\\"111\\\",\\\"leaderMaxLevel\\\":4,\\\"startTime\\\":1584198046737,\\\"status\\\":\\\"APPROVING\\\",\\\"type\\\":\\\"Internal\\\"}\"', 'CREATE_EVENT', NULL, '2020-03-14 23:00:47');
COMMIT;

-- ----------------------------
-- Table structure for leave_info
-- ----------------------------
DROP TABLE IF EXISTS `leave_info`;
CREATE TABLE `leave_info` (
  `id` varchar(255) NOT NULL,
  `applicant_id` varchar(255) DEFAULT NULL,
  `applicant_name` varchar(255) DEFAULT NULL,
  `applicant_type` varchar(255) DEFAULT NULL,
  `approver_id` varchar(255) DEFAULT NULL,
  `approver_name` varchar(255) DEFAULT NULL,
  `duration` bigint(20) NOT NULL,
  `end_time` datetime DEFAULT NULL,
  `leave_type` varchar(255) DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of leave_info
-- ----------------------------
BEGIN;
INSERT INTO `leave_info` VALUES ('ff80808170d9896a0170d989f5560000', '1', 'xiaoming', NULL, '1', '22', 0, NULL, NULL, '2020-03-14 22:54:22', 'APPROVING');
INSERT INTO `leave_info` VALUES ('ff80808170d98b910170d98bb3db0000', '1', 'xiaoming', NULL, '1', '22', 0, NULL, NULL, '2020-03-14 22:56:16', 'APPROVING');
INSERT INTO `leave_info` VALUES ('ff80808170d98c3b0170d98c73a00000', '1', 'xiaoming', NULL, '1', '22', 0, NULL, NULL, '2020-03-14 22:57:01', 'APPROVING');
INSERT INTO `leave_info` VALUES ('ff80808170d98d990170d98dbe020000', '1', 'xiaoming', NULL, '1', '22', 0, NULL, NULL, '2020-03-14 22:58:30', 'APPROVING');
INSERT INTO `leave_info` VALUES ('ff80808170d98eee0170d98f15ba0000', '1', 'xiaoming', NULL, '1', '22', 0, NULL, NULL, '2020-03-14 22:59:57', 'APPROVING');
INSERT INTO `leave_info` VALUES ('ff80808170d98fb70170d98fd4590000', '1', 'xiaoming', NULL, '1', '22', 0, NULL, NULL, '2020-03-14 23:00:47', 'APPROVING');
COMMIT;

-- ----------------------------
-- Table structure for person
-- ----------------------------
DROP TABLE IF EXISTS `person`;
CREATE TABLE `person` (
  `person_id` varchar(255) NOT NULL,
  `create_time` datetime DEFAULT NULL,
  `department_id` varchar(255) DEFAULT NULL,
  `last_modify_time` datetime DEFAULT NULL,
  `person_name` varchar(255) DEFAULT NULL,
  `person_type` varchar(255) DEFAULT NULL,
  `role_level` int(11) NOT NULL,
  `status` varchar(255) DEFAULT NULL,
  `relationshippo_id` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`person_id`),
  KEY `FKb320sglrbm7rcvqcjaxwc2uaw` (`relationshippo_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of person
-- ----------------------------
BEGIN;
INSERT INTO `person` VALUES ('1', '2020-03-14 22:37:48', '1', '2020-03-14 22:37:52', '22', 'INTERNAL', 4, 'ENABLE', '1');
COMMIT;

-- ----------------------------
-- Table structure for relationshippo
-- ----------------------------
DROP TABLE IF EXISTS `relationshippo`;
CREATE TABLE `relationshippo` (
  `id` varchar(255) NOT NULL,
  `leader_id` varchar(255) DEFAULT NULL,
  `person_id` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of relationshippo
-- ----------------------------
BEGIN;
INSERT INTO `relationshippo` VALUES ('1', '1', '1');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
